package com.pn.mapper;

import com.pn.entity.purchaseAmount;
import com.pn.vo.StoreCountVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface StatisticsMapper {


    List<StoreCountVo> findStoreCount();

    @Select("select t2.product_name name ,sum(t1.fact_buy_num) value from buy_list t1 , product t2 " +
            "where t1.product_id=t2.product_id group by t2.product_name")
    List<purchaseAmount> purchaseAmount();
}
